export default {
  // 开启命名空间
  namespaced: true,
  state: () => ({
    homeData: {},
    goodsList: {},
    count: 0,
    id: [],
    money: 0,
    activeKey: 0
  }),
  mutations: {
    saveHomeData(state, homeData) {
      state.homeData = homeData
    },
    saveGoodsList(state, goods) {
      state.goodsList = goods
    },
    addCount(state, id) {
      state.count++
      state.id.push(id)
      state.money = (state.count * 28.8).toFixed(2)
    },
    saveActiveKey(state, i) {
      state.activeKey = i
    }
  },
  getters: {}
}
